#pragma once
#include <BWAPI.h>
#include <BWTA.h>
class TJDevHouseAIModule : public BWAPI::AIModule
{
public:
	//virtual void onEnd(); <--

	/*
	void showStats(); //not part of BWAPI::AIModule
	void showPlayers();
	void showForces();
	BWTA::Region* home;
	BWTA::Region* enemy_base;
	bool analyzed;
	std::map<BWAPI::Unit*,BWAPI::UnitType> buildings;
*/
	
	//virtual void onRemove(BWAPI::Unit* unit); <--

	virtual void onStart();
	virtual void onEnd(bool isWinner);
	virtual void onFrame();
	virtual bool onSendText(std::string text);
	virtual void onPlayerLeft(BWAPI::Player* player);
	virtual void onNukeDetect(BWAPI::Position target);
	virtual void onUnitCreate(BWAPI::Unit* unit);
	virtual void onUnitDestroy(BWAPI::Unit* unit);
	virtual void onUnitMorph(BWAPI::Unit* unit);
	virtual void onUnitShow(BWAPI::Unit* unit);
	virtual void onUnitHide(BWAPI::Unit* unit);
	virtual void onUnitRenegade(BWAPI::Unit* unit);

	//take action upon disconnection
	virtual void handleDisconnect();

	char *strtok_wrap(char* _Str, const char* _Delim);

	//tile bit mask values
	static const int TILE_BUILDABLE = 4;
	static const int TILE_WALKABLE = 2;
	static const int TILE_HEIGHT = 1;

	//unit status bit mask values (there are 42 possible states,
	//bm values could get excessive, so just add to this selection
	//as needed.
	//some statuses can be worked out from the game state, e.g. IsVisible(),
	//IsCompleted(), IsIdle()
	static const int UNIT_STATUS_BEING_CONSTRUCTED = 1;
	static const int UNIT_STATUS_BLIND = 2;
	static const int UNIT_STATUS_BURROWED = 4;
	static const int UNIT_STATUS_CARRYING_GAS = 8;
	static const int UNIT_STATUS_CARRYING_MINERALS = 16;
	static const int UNIT_STATUS_CLOAKED = 32;
	static const int UNIT_STATUS_CONSTRUCTING = 64;
	static const int UNIT_STATUS_GATHERING_GAS = 128;
	static const int UNIT_STATUS_GATHERING_MINERALS = 256;
	static const int UNIT_STATUS_REPAIRING = 512;
	static const int UNIT_STATUS_RESEARCHING = 1024;
	static const int UNIT_STATUS_SIEGED = 2048;
	static const int UNIT_STATUS_TRAINING = 4096;
	static const int UNIT_STATUS_UNPOWERED = 8192;
	static const int UNIT_STATUS_UPGRADING = 16384;
	


};